$(function () {
    share();
    loadFoot(2);
    var listName=$.getUrlParam('listName');
    var info=$.getUrlParam('info');
    document.title=$.getUrlParam('title')+'修改';
    $('input[name=info]').val(info);
    var myFakeLoading=new FakerLoading('.loadingBox',{
        bgColor:'rgba(0,0,0,.6)',
        childrenScale:1.5
    });
    $('#submitBtn').click(function(){
        var modifyTxt=$('input[name=info]').val();
        if(!modifyTxt){
            alert('修改内容不能为空！')
        }else {
            myFakeLoading.showIn();
            var data={openid:openid,cid:cid}
            data[listName]=modifyTxt;
            console.log(data);
            $.ajax({
                url:host+'/CMSAPI/setPartner',
                type:'POST',
                data:data,
                success:function (data) {
                    if(data.state){
                        myFakeLoading.showOut();
                        alert('信息修改成功！');
                        self.location=document.referrer
                    }
                }
            })
        };
    })
});